#ifndef HARVEST_H
#define HARVEST_H

#include "AntPolicy.h"


class Harvest: public AntPolicy
{
    public:
        Harvest(State* state) : AntPolicy(state){}
        virtual ~Harvest(){}
        void operator()(const Target::AntVector::value_type& ant);
        bool tryMove(const Ant& ant, const Task& task);
        bool canMove(const Location& from, const Location& to) const;
        bool canFollow(const Location& from, const Location& to) const;
        void Follow(Target::AntVector::value_type& ant);

    private:
        bool getTask(const Ant& ant, WeightTask& task, bool enumerateOccuped);
        int GetDirection(const Location& from, const Location& to) const;
        int distanceFast(const Location &loc1, const Location &loc2) const;

    private:
        //Target::AntVector freeAnts;

};


#endif // HARVEST_H
